package onetotwenty;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

import org.junit.Test;

public class ProblemTwo {
	@Test
	public void problem2() {
		int i = 1, j = 1, k = 0;
		int item = 0;
	
		while (k <= 4000000) {
			k = i + j;
	
			if (k % 2 == 0) {
				item += k;
			}
	
			i = j;
			j = k;
		}
	
		System.out.println("two : " + item);
		assertThat(item, is(4613732));
	}
}

